var load_floor_checkbox_by_buildingId = null;
var load_floor_select_by_buildingId = null;
var load_floor_cond_select_by_buildingId = null;
var load_room_select_by_floorId = null;
var load_room_cond_select_by_floorId = null;
var load_bed_by_floorId = null;
var load_elderFamilyMember_by_elderId = null;
var load_floor_by_buildingId = null;
var load_room_by_floorId = null;
var load_bed_select_by_roomId = null;
var load_roomAsset_by_roomId = null;
var load_bed_cond_select_by_roomId = null;
var load_foodAllowance_select = null;
var elderOutCost_findElderOutCost = null;
var load_bed_by_roomId = null;
var assignDepartment = null;
var assignSubjectRoom = null;
var assignDuty = null;
var vipCardFind = null;
var behalf_material_view = null;
var mat_operation_vue_vm = null;
var findElder = null;
var findElderInfoByElderId = null;
var autoSearchDetail = null;
var elderArrearage_find = null;
var showPaperUseNum = null;
var findElderByFloor = null;
var findElderInfoByType = null;


function getSubsidizationValue(subsidization, subsidizationValue) {
	return subsidization=='无补助'? '': subsidizationValue;
}

function getSubsidizationUnit(subsidization) {
	return subsidization=='饭卡补助'? '元': (subsidization=='包餐补助'?'天':'');
}

function getSubsidizationText(subsidization, subsidizationValue) {
	return subsidization + getSubsidizationValue(subsidization, subsidizationValue) + getSubsidizationUnit(subsidization);
}

function getConsDeductionText(consumptionWay, consDeductionWay) {
	if(!consumptionWay||consumptionWay=='') {
		consumptionWay = '半个月扣费';
	}
	return consumptionWay+consDeductionWay+'元';
}

//总共可扣月数
function getTotalMonths(todo) {
	return todo.durableYears*12;
}

//剩余可扣月数
function getRemainMonths(todo) {
	return todo.surplusMonths;
}

//已扣月数
function getAlreadyUsedMonths(todo) {
	var alreadyUsedMonths = getTotalMonths(todo) - getRemainMonths(todo);
	return alreadyUsedMonths;
}

//总共可扣天数
function getTotalNumber(todo) {
	/*
	if(todo.consumptionWay=='半个月扣费') {
		return 24;
	}else {
		return 12;
	}
	*/
	return todo.durableYears*365;
}

//剩余可扣天数
function getRemainNumber(todo) {
	return todo.buckleNumber;
}

//已扣天数
function getAlreadyUsedNumber(todo) {
	var alreadyUsedNumber = getTotalNumber(todo) - getRemainNumber(todo);
	return alreadyUsedNumber;
}

function getChepingUrl(elderId, elderName, elderCardId) {
	var url = '2-2-1cheping-result.html?testTimesNumber=0&elderId='+elderId
			+'&elderName='+elderName+'&elderCard='+elderCardId;
	return url;
}

function isEmpty(str) {
	return !str || str=='';
}

//判断是否正整数（允许0作为前缀）
function isPositiveInt(str) {
	var reg = /^\+?[0-9]*[1-9][0-9]*$/;
	return reg.test(str+'');
}